Generalized Parsing and Term Rewriting: Semantics Driven Disambiguation
نویسندگان
چکیده
Generalized parsing technology provides the power and flexibility to attack realworld parsing applications. However, many programming languages have syntactical ambiguities that can only be solved using semantical analysis. In this paper we propose to apply the paradigm of term rewriting to filter ambiguities based on semantical information. We start with the definition of a representation of ambiguous derivations. Then we extend term rewriting with means to handle such derivations. Finally, we apply these tools to some real world examples, namely C and COBOL. The resulting architecture is simple and efficient as compared to semantic directed parsing.
منابع مشابه
Data-driven Parsing using PLCFRS Data-driven Parsing using Probabilistic Linear Context-Free Rewriting Systems
This paper presents the first efficient implementation of a weighted deductive CYK parser for Probabilistic Linear Context-Free Rewriting Systems (PLCFRS). LCFRS, an extension of CFG, can describe discontinuities in a straightforward way and is therefore a natural candidate to be used for data-driven parsing. To speed up parsing, we use different context-summary estimates of parse items, some o...
متن کاملData-Driven Parsing using Probabilistic Linear Context-Free Rewriting Systems
This paper presents the first efficient implementation of a weighted deductive CYK parser for Probabilistic Linear Context-Free Rewriting Systems (PLCFRSs). LCFRS, an extension of CFG, can describe discontinuities in a straightforward way and is therefore a natural candidate to be used for data-driven parsing. To speed up parsing, we use different context-summary estimates of parse items, some ...
متن کاملCOGPARSE: Brain-Inspired Knowledge-Driven Full Semantics Parsing - Radical Construction Grammar, Categories, Knowledge-Based Parsing & Representation
Humans use semantics during parsing; so should computers. In contrast to phrase structure-based parsers, COGPARSE seeks to determine which meaning-bearing components are present in a text, using world knowledge and lexical semantics for construction grammar form selection, syntactic overlap processing, disambiguation, and confidence calculation. In a brain-inspired way, COGPARSE aligns parsing ...
متن کاملSafe Specification of Operator Precedence Rules
In this paper we present an approach to specifying operator precedence based on declarative disambiguation constructs and an implementation mechanism based on grammar rewriting. We identify a problem with existing generalized context-free parsing and disambiguation technology: generating a correct parser for a language such as OCaml using declarative precedence specification is not possible wit...
متن کاملIsland Grammar-Based Parsing Using GLL and Tom
Extending a language by embedding within it another language presents significant parsing challenges, especially if the embedding is recursive. The composite grammar is likely to be nondeterministic as a result of tokens that are valid in both the host and the embedded language. In this paper we examine the challenges of embedding the Tom language into a variety of general-purpose high level la...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Electr. Notes Theor. Comput. Sci.
دوره 82 شماره
صفحات -
تاریخ انتشار 2003